<?php

include  '../Util.php';
?>
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="uploadify/swfobject.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#file_upload').uploadify({
            'uploader'  : 'uploadify/uploadify.swf',
            'script'    : 'uploadify/uploadify.php',
            'folder'    : '../<?php echo Constants::$uploads_dir ?>',
            'auto'      : true,
            'multi'      : true,
            'removeCompleted': false,
            'queueID'        : 'custom-queue',
            'queueSizeLimit' : 3,
            'simUploadLimit' : 3,
            'onSelectOnce'   : function(event,data) {
                $('#status-message').text(data.filesSelected + ' files have been added to the queue.');
            },
            'onAllComplete'  : function(event,data) {
                $('#status-message').text(data.filesUploaded + ' files uploaded, ' + data.errors + ' errors.');
            }
        });
    });
</script>